:root {
  --primary-color: #4CAF50;
  --secondary-color: #FFB74D;
  --text-color: #333333;
  --background-color: #F5F5F5;
  --card-background: #FFFFFF;
  --border-radius: 12px;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

.device-container {
  width: 375px;
  height: 812px;
  margin: 20px auto;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  background-color: var(--background-color);
  border: 12px solid #000;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
  background-color: var(--background-color);
  height: 44px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
}

.status-bar-left {
  font-weight: bold;
}

.status-bar-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.app-container {
  height: calc(100% - 44px - 70px);
  overflow-y: auto;
}

.navbar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-background);
  height: 70px;
  width: 100%;
  padding: 10px 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  text-decoration: none;
  font-size: 12px;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-icon {
  margin-bottom: 4px;
}

.header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title {
  font-size: 24px;
  font-weight: bold;
}

.card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 15px;
  margin: 10px 15px;
}

.button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.button:hover {
  opacity: 0.9;
}

.button.secondary {
  background-color: var(--secondary-color);
}

.button.ghost {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.dish-card {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.dish-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  margin-right: 15px;
}

.dish-info {
  flex: 1;
}

.dish-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 5px;
}

.dish-description {
  color: #777;
  font-size: 14px;
  margin-bottom: 5px;
}

.dish-price {
  color: var(--primary-color);
  font-weight: bold;
}

.dish-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  width: 80%;
  max-width: 300px;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-title {
  font-weight: bold;
  font-size: 18px;
}

.modal-close {
  cursor: pointer;
  font-size: 20px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

/* 主题色变量 */
.theme-green {
  --primary-color: #4CAF50;
}

.theme-yellow {
  --primary-color: #FFC107;
}

.theme-blue {
  --primary-color: #2196F3;
}

.theme-purple {
  --primary-color: #9C27B0;
}

/* 布局变量 */
.layout-grid .dish-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 15px;
}

.layout-grid .dish-card {
  flex-direction: column;
  text-align: center;
}

.layout-grid .dish-image {
  width: 100%;
  height: 120px;
  margin-right: 0;
  margin-bottom: 10px;
}

/* 字体变量 */
.font-round {
  font-family: 'Varela Round', 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-serif {
  font-family: 'Noto Serif SC', serif;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 15px 10px;
}

.section-divider {
  height: 10px;
  background-color: #f0f0f0;
  margin: 15px 0;
}

.badge {
  background-color: var(--primary-color);
  color: white;
  padding: 3px 8px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
}

.item-list {
  list-style: none;
}

.item-list-item {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hidden {
  display: none;
}

/* 平滑过渡 */
.fade-transition {
  transition: all 0.3s ease;
}

/* 饮食计划页面样式 */
.tab-bar {
  display: flex;
  margin: 10px 15px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  background-color: #fff;
  cursor: pointer;
}

.tab.active {
  background-color: var(--primary-color);
  color: white;
}

.meal-plan-day {
  margin: 10px 0;
}

.meal-plan-date {
  font-weight: 600;
  margin-left: 15px;
}

.meal-card {
  display: flex;
  margin: 10px 15px;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.meal-time {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

.meal-content {
  flex: 1;
  padding: 15px;
}

.nutrition-chart {
  height: 200px;
  margin: 15px;
  background-color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.nutrition-data {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 15px;
}

.nutrition-item {
  background-color: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.nutrition-label {
  color: #777;
  font-size: 14px;
}

.nutrition-value {
  font-weight: 600;
  font-size: 18px;
  color: var(--primary-color);
}

/* 发现页样式 */
.discover-banner {
  height: 180px;
  margin: 15px;
  border-radius: 12px;
  background-color: #f3f3f3;
  overflow: hidden;
  position: relative;
}

.discover-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-banner-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
}

.category-pills {
  display: flex;
  overflow-x: auto;
  padding: 0 15px;
  gap: 10px;
  margin-bottom: 10px;
}

.category-pill {
  white-space: nowrap;
  padding: 8px 15px;
  background-color: white;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-pill.active {
  background-color: var(--primary-color);
  color: white;
}

/* 个人页面样式 */
.profile-header {
  padding: 30px 15px;
  display: flex;
  align-items: center;
  background-color: var(--card-background);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

.profile-name {
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 5px;
}

.profile-bio {
  color: #777;
}

.settings-group {
  margin: 20px 0;
}

.settings-title {
  padding: 0 15px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #777;
}

.settings-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: white;
  border-bottom: 1px solid #f3f3f3;
}

.color-options, .font-options, .layout-options {
  display: flex;
  padding: 15px;
  gap: 10px;
  overflow-x: auto;
  background-color: white;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.color-option.active {
  border-color: #333;
}

.font-option, .layout-option {
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid #ddd;
}

.font-option.active, .layout-option.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 菜品详情页样式 */
.dish-detail-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.dish-detail-header {
  padding: 20px 15px;
  border-bottom: 1px solid #eee;
}

.dish-detail-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 5px;
}

.dish-detail-meta {
  display: flex;
  justify-content: space-between;
  color: #777;
  margin-bottom: 10px;
}

.dish-detail-section {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.dish-detail-section-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.ingredients-list, .steps-list {
  list-style: none;
}

.ingredient-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.step-item {
  display: flex;
  margin-bottom: 15px;
}

.step-number {
  width: 25px;
  height: 25px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.nutrition-table {
  width: 100%;
  border-collapse: collapse;
}

.nutrition-table th, .nutrition-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.nutrition-table th {
  color: #777;
  font-weight: normal;
}

.dish-actions-fixed {
  position: sticky;
  bottom: 0;
  background-color: white;
  padding: 15px;
  display: flex;
  gap: 10px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* iframe容器样式 */
.iframe-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

.iframe-wrapper {
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.iframe-title {
  padding: 10px;
  font-weight: bold;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

iframe {
  border: none;
  width: 375px;
  height: 812px;
} 